package com.cenxi.ipdemo1.utils.excel;

import javax.servlet.http.HttpServletResponse;

/**
 * @author admin
 */
public class HttpUtils {
    private HttpUtils() {}
    public static void setResponse(HttpServletResponse response, String fileName)  {
        response.reset();
        response.setContentType("application/octet-stream");
        response.addHeader("content-type", "application/octet-stream;charset=UTF-8");
        response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
        response.addHeader("Cache-Control", "no-cache");
    }
}
